Skip to content

gh-143700: document secrets.DEFAULT_ENTROPY as an opaque value#144568

Merged
picnixz merged 4 commits intopython:mainfrom
picnixz:doc/secrets/document-default-entropy-143700
Feb 7, 2026
Merged

gh-143700: document secrets.DEFAULT_ENTROPY as an opaque value#144568
picnixz merged 4 commits intopython:mainfrom
picnixz:doc/secrets/document-default-entropy-143700

Conversation

@picnixz
Copy link
Member

@picnixz picnixz commented Feb 7, 2026

@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news labels Feb 7, 2026
@picnixz picnixz requested a review from gpshead February 7, 2026 12:33
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Feb 7, 2026
@picnixz picnixz requested a review from sethmlarson February 7, 2026 12:33
@picnixz picnixz added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Feb 7, 2026
@picnixz
Copy link
Member Author

picnixz commented Feb 7, 2026

I'm a bit unsure where to really put the name of that constant. I do want users to be able to use the constant itself but I don't want them to change it. Should I add an additional note saying that the value should not be changed?

Copy link
Member

@gpshead gpshead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit unsure where to really put the name of that constant. I do want users to be able to use the constant itself but I don't want them to change it. Should I add an additional note saying that the value should not be changed?

that's probably overthinking it, we have all sorts of constants in Python modules that if changed will cause bad behavior - I don't think any special callout is necessary.

if we wanted to prevent it from being changed that'd require getting too creative with the module dict or using a C extension module instead. We rejected PEP-726 that could've offered an ability because the actual need was so rare.

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
@picnixz picnixz merged commit 9349972 into python:main Feb 7, 2026
33 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Feb 7, 2026
@miss-islington-app
Copy link

Thanks @picnixz for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@picnixz picnixz deleted the doc/secrets/document-default-entropy-143700 branch February 7, 2026 22:36
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 7, 2026
pythonGH-144568)

(cherry picked from commit 9349972)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 7, 2026
pythonGH-144568)

(cherry picked from commit 9349972)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Feb 7, 2026

GH-144579 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Feb 7, 2026
@bedevere-app
Copy link

bedevere-app bot commented Feb 7, 2026

GH-144580 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Feb 7, 2026
picnixz added a commit that referenced this pull request Feb 7, 2026
…ue (GH-144568) (#144579)

gh-143700: document `secrets.DEFAULT_ENTROPY` as an opaque value (GH-144568)
(cherry picked from commit 9349972)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
picnixz added a commit that referenced this pull request Feb 7, 2026
…ue (GH-144568) (#144580)

gh-143700: document `secrets.DEFAULT_ENTROPY` as an opaque value (GH-144568)
(cherry picked from commit 9349972)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants